home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / locale / nsILocaleService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  232 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsILocaleService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsILocaleService_h__
  6. #define __gen_nsILocaleService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsILocale_h__
  14. #include "nsILocale.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsILocaleDefinition */
  23. #define NS_ILOCALEDEFINITION_IID_STR "7c094410-4558-11d3-91cd-00105aa3f7dc"
  24.  
  25. #define NS_ILOCALEDEFINITION_IID \
  26.   {0x7c094410, 0x4558, 0x11d3, \
  27.     { 0x91, 0xcd, 0x00, 0x10, 0x5a, 0xa3, 0xf7, 0xdc }}
  28.  
  29. class NS_NO_VTABLE nsILocaleDefinition : public nsISupports {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOCALEDEFINITION_IID)
  33.  
  34.   /* void setLocaleCategory (in AString category, in AString value); */
  35.   NS_IMETHOD SetLocaleCategory(const nsAString & category, const nsAString & value) = 0;
  36.  
  37. };
  38.  
  39. /* Use this macro when declaring classes that implement this interface. */
  40. #define NS_DECL_NSILOCALEDEFINITION \
  41.   NS_IMETHOD SetLocaleCategory(const nsAString & category, const nsAString & value); 
  42.  
  43. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  44. #define NS_FORWARD_NSILOCALEDEFINITION(_to) \
  45.   NS_IMETHOD SetLocaleCategory(const nsAString & category, const nsAString & value) { return _to SetLocaleCategory(category, value); } 
  46.  
  47. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  48. #define NS_FORWARD_SAFE_NSILOCALEDEFINITION(_to) \
  49.   NS_IMETHOD SetLocaleCategory(const nsAString & category, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLocaleCategory(category, value); } 
  50.  
  51. #if 0
  52. /* Use the code below as a template for the implementation class for this interface. */
  53.  
  54. /* Header file */
  55. class nsLocaleDefinition : public nsILocaleDefinition
  56. {
  57. public:
  58.   NS_DECL_ISUPPORTS
  59.   NS_DECL_NSILOCALEDEFINITION
  60.  
  61.   nsLocaleDefinition();
  62.  
  63. private:
  64.   ~nsLocaleDefinition();
  65.  
  66. protected:
  67.   /* additional members */
  68. };
  69.  
  70. /* Implementation file */
  71. NS_IMPL_ISUPPORTS1(nsLocaleDefinition, nsILocaleDefinition)
  72.  
  73. nsLocaleDefinition::nsLocaleDefinition()
  74. {
  75.   /* member initializers and constructor code */
  76. }
  77.  
  78. nsLocaleDefinition::~nsLocaleDefinition()
  79. {
  80.   /* destructor code */
  81. }
  82.  
  83. /* void setLocaleCategory (in AString category, in AString value); */
  84. NS_IMETHODIMP nsLocaleDefinition::SetLocaleCategory(const nsAString & category, const nsAString & value)
  85. {
  86.     return NS_ERROR_NOT_IMPLEMENTED;
  87. }
  88.  
  89. /* End of implementation class template. */
  90. #endif
  91.  
  92.  
  93. /* starting interface:    nsILocaleService */
  94. #define NS_ILOCALESERVICE_IID_STR "48ab1fa0-4550-11d3-91cd-00105aa3f7dc"
  95.  
  96. #define NS_ILOCALESERVICE_IID \
  97.   {0x48ab1fa0, 0x4550, 0x11d3, \
  98.     { 0x91, 0xcd, 0x00, 0x10, 0x5a, 0xa3, 0xf7, 0xdc }}
  99.  
  100. class NS_NO_VTABLE nsILocaleService : public nsISupports {
  101.  public: 
  102.  
  103.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOCALESERVICE_IID)
  104.  
  105.   /* nsILocale newLocale (in AString aLocale); */
  106.   NS_IMETHOD NewLocale(const nsAString & aLocale, nsILocale **_retval) = 0;
  107.  
  108.   /* nsILocale newLocaleObject (in nsILocaleDefinition localeDefinition); */
  109.   NS_IMETHOD NewLocaleObject(nsILocaleDefinition *localeDefinition, nsILocale **_retval) = 0;
  110.  
  111.   /* nsILocale getSystemLocale (); */
  112.   NS_IMETHOD GetSystemLocale(nsILocale **_retval) = 0;
  113.  
  114.   /* nsILocale getApplicationLocale (); */
  115.   NS_IMETHOD GetApplicationLocale(nsILocale **_retval) = 0;
  116.  
  117.   /* nsILocale getLocaleFromAcceptLanguage (in string acceptLanguage); */
  118.   NS_IMETHOD GetLocaleFromAcceptLanguage(const char *acceptLanguage, nsILocale **_retval) = 0;
  119.  
  120.   /* AString getLocaleComponentForUserAgent (); */
  121.   NS_IMETHOD GetLocaleComponentForUserAgent(nsAString & _retval) = 0;
  122.  
  123. };
  124.  
  125. /* Use this macro when declaring classes that implement this interface. */
  126. #define NS_DECL_NSILOCALESERVICE \
  127.   NS_IMETHOD NewLocale(const nsAString & aLocale, nsILocale **_retval); \
  128.   NS_IMETHOD NewLocaleObject(nsILocaleDefinition *localeDefinition, nsILocale **_retval); \
  129.   NS_IMETHOD GetSystemLocale(nsILocale **_retval); \
  130.   NS_IMETHOD GetApplicationLocale(nsILocale **_retval); \
  131.   NS_IMETHOD GetLocaleFromAcceptLanguage(const char *acceptLanguage, nsILocale **_retval); \
  132.   NS_IMETHOD GetLocaleComponentForUserAgent(nsAString & _retval); 
  133.  
  134. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  135. #define NS_FORWARD_NSILOCALESERVICE(_to) \
  136.   NS_IMETHOD NewLocale(const nsAString & aLocale, nsILocale **_retval) { return _to NewLocale(aLocale, _retval); } \
  137.   NS_IMETHOD NewLocaleObject(nsILocaleDefinition *localeDefinition, nsILocale **_retval) { return _to NewLocaleObject(localeDefinition, _retval); } \
  138.   NS_IMETHOD GetSystemLocale(nsILocale **_retval) { return _to GetSystemLocale(_retval); } \
  139.   NS_IMETHOD GetApplicationLocale(nsILocale **_retval) { return _to GetApplicationLocale(_retval); } \
  140.   NS_IMETHOD GetLocaleFromAcceptLanguage(const char *acceptLanguage, nsILocale **_retval) { return _to GetLocaleFromAcceptLanguage(acceptLanguage, _retval); } \
  141.   NS_IMETHOD GetLocaleComponentForUserAgent(nsAString & _retval) { return _to GetLocaleComponentForUserAgent(_retval); } 
  142.  
  143. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  144. #define NS_FORWARD_SAFE_NSILOCALESERVICE(_to) \
  145.   NS_IMETHOD NewLocale(const nsAString & aLocale, nsILocale **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewLocale(aLocale, _retval); } \
  146.   NS_IMETHOD NewLocaleObject(nsILocaleDefinition *localeDefinition, nsILocale **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewLocaleObject(localeDefinition, _retval); } \
  147.   NS_IMETHOD GetSystemLocale(nsILocale **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSystemLocale(_retval); } \
  148.   NS_IMETHOD GetApplicationLocale(nsILocale **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApplicationLocale(_retval); } \
  149.   NS_IMETHOD GetLocaleFromAcceptLanguage(const char *acceptLanguage, nsILocale **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocaleFromAcceptLanguage(acceptLanguage, _retval); } \
  150.   NS_IMETHOD GetLocaleComponentForUserAgent(nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocaleComponentForUserAgent(_retval); } 
  151.  
  152. #if 0
  153. /* Use the code below as a template for the implementation class for this interface. */
  154.  
  155. /* Header file */
  156. class nsLocaleService : public nsILocaleService
  157. {
  158. public:
  159.   NS_DECL_ISUPPORTS
  160.   NS_DECL_NSILOCALESERVICE
  161.  
  162.   nsLocaleService();
  163.  
  164. private:
  165.   ~nsLocaleService();
  166.  
  167. protected:
  168.   /* additional members */
  169. };
  170.  
  171. /* Implementation file */
  172. NS_IMPL_ISUPPORTS1(nsLocaleService, nsILocaleService)
  173.  
  174. nsLocaleService::nsLocaleService()
  175. {
  176.   /* member initializers and constructor code */
  177. }
  178.  
  179. nsLocaleService::~nsLocaleService()
  180. {
  181.   /* destructor code */
  182. }
  183.  
  184. /* nsILocale newLocale (in AString aLocale); */
  185. NS_IMETHODIMP nsLocaleService::NewLocale(const nsAString & aLocale, nsILocale **_retval)
  186. {
  187.     return NS_ERROR_NOT_IMPLEMENTED;
  188. }
  189.  
  190. /* nsILocale newLocaleObject (in nsILocaleDefinition localeDefinition); */
  191. NS_IMETHODIMP nsLocaleService::NewLocaleObject(nsILocaleDefinition *localeDefinition, nsILocale **_retval)
  192. {
  193.     return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195.  
  196. /* nsILocale getSystemLocale (); */
  197. NS_IMETHODIMP nsLocaleService::GetSystemLocale(nsILocale **_retval)
  198. {
  199.     return NS_ERROR_NOT_IMPLEMENTED;
  200. }
  201.  
  202. /* nsILocale getApplicationLocale (); */
  203. NS_IMETHODIMP nsLocaleService::GetApplicationLocale(nsILocale **_retval)
  204. {
  205.     return NS_ERROR_NOT_IMPLEMENTED;
  206. }
  207.  
  208. /* nsILocale getLocaleFromAcceptLanguage (in string acceptLanguage); */
  209. NS_IMETHODIMP nsLocaleService::GetLocaleFromAcceptLanguage(const char *acceptLanguage, nsILocale **_retval)
  210. {
  211.     return NS_ERROR_NOT_IMPLEMENTED;
  212. }
  213.  
  214. /* AString getLocaleComponentForUserAgent (); */
  215. NS_IMETHODIMP nsLocaleService::GetLocaleComponentForUserAgent(nsAString & _retval)
  216. {
  217.     return NS_ERROR_NOT_IMPLEMENTED;
  218. }
  219.  
  220. /* End of implementation class template. */
  221. #endif
  222.  
  223. // {C8E518C1-47AE-11d3-91CD-00105AA3F7DC}
  224. #define NS_LOCALESERVICE_CID {0xc8e518c1,0x47ae,0x11d3,{0x91,0xcd,0x0,0x10,0x5a,0xa3,0xf7,0xdc}}
  225. #define NS_LOCALESERVICE_CONTRACTID "@mozilla.org/intl/nslocaleservice;1"
  226. extern nsresult
  227. NS_NewLocaleService(nsILocaleService** result);
  228. extern nsresult
  229. NS_NewLocaleDefinition(nsILocaleDefinition** result);
  230.  
  231. #endif /* __gen_nsILocaleService_h__ */
  232.